import Vue from 'vue'
import Vuex from 'vuex'
import baseFontSytleConfig from './baseFontSytleConfig'
import printBoxStyleConfig from './printBoxStyleConfig'
import elementBorderConfig from './elementBorderConfig'
import elementRadiusConfig from './elementRadiusConfig'
import deviceInfo from './deviceInfo'

Vue.use(Vuex)

const data = {
    state: {
        baseConfig: {
            ...printBoxStyleConfig.state.printBoxStyleConfig,
            ...baseFontSytleConfig.state.baseFontSytleConfig,
            ...elementBorderConfig.state.elementBorderConfig,
            ...elementRadiusConfig.state.elementRadiusConfig,
            ...deviceInfo.state.deviceInfo
        }
    },
    mutations: {
        ...printBoxStyleConfig.mutations,
        ...baseFontSytleConfig.mutations,
        ...elementBorderConfig.mutations,
        ...elementRadiusConfig.mutations,
        ...deviceInfo.mutations
    },
}

export default new Vuex.Store(data)